class Shop {
   constructor () {
     this.goods = {}
   }
   stock (type, key, good) { // 进货
      if (!(type in this.goods)) {
        this.goods[type] = {}
      }
     this.goods[type][key] = good
   }
   sale (type, key) { // 售卖
     return type in this.goods ? this.goods[type][key] : undefined
   }
}

export default new Shop()
